package com.gugee.ins.data.collector.comment.config;

import com.alibaba.nacos.api.config.annotation.NacosValue;
import lombok.Getter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

/**
 * InsCommentConfig
 * @author Huangxin
 */
@Configuration
@Getter
public class InsCommentConfig {
    /**
     * 数据查询时间范围
     */
    @NacosValue(value = "${ins.data.collector.query.latestDays:30}", autoRefreshed = true)
    int latestDays;

    /**
     * 日志打印时间要求
     */
    @NacosValue(value="${ins.data.collector.comment.logTime.debug.limit:50}", autoRefreshed = true)
    long commentDebugTimeLimit;

    /**
     * insComment 主线程池数
     */
    @Value(value="${ins.data.threadpools.insComment.corePollSize}")
    int insCommentCorePollSize;

    /**
     * insComment kafka topic
     */
    @Value(value="${kafka.topics.insCommentCollect.online}")
    String insCommentCollectOnlineTopic;

    /**
     * insBloggerPriority kafka topic
     */
    @Value(value="${kafka.topics.insBloggerPriorityCollect.online}")
    String insBloggerPriorityCollectOnlineTopic;

    /**
     * insAnalysisAvatar kafka topic
     */
    @Value(value="${kafka.topics.insAnalysisAvatar.priority}")
    String insAnalysisAvatarPriorityTopic;

    /**
     * insAnalysisLanguage kafka topic
     */
    @Value(value="${kafka.topics.insAnalysisLanguage.priority}")
    String insAnalysisLanguagePriorityTopic;

    /**
     * insBloggerLocation kafka topic
     */
    @Value(value="${kafka.topics.insBloggerLocation.priority}")
    String insBloggerLocationPriorityTopic;
    /**
     * insBloggerFollowing kafka topic
     */
    @Value(value="${kafka.topics.insBloggerFollowing.priority}")
    String insBloggerFollowingPriorityTopic;

    /**
     * insComment 消息重发最大次数
     */
    @NacosValue(value="${ins.data.collector.message.insComment.retry:1}", autoRefreshed = true)
    int insCommentRetryTimes;

    /**
     * insBloggerPriority 消息重发最大次数
     */
    @NacosValue(value="${ins.data.collector.message.insBloggerPriority.retry:1}", autoRefreshed = true)
    int insBloggerPriorityRetryTimes;

    /**
     * insAnalysisAvatarPriority 消息重发最大次数
     */
    @NacosValue(value="${ins.data.collector.message.insAnalysisAvatarPriority.retry:1}", autoRefreshed = true)
    int insAnalysisAvatarPriorityRetryTimes;

    /**
     * insAnalysisLanguagePriorityRetryTimes 消息重发最大次数
     */
    @NacosValue(value="${ins.data.collector.message.insAnalysisLanguagePriority.retry:1}", autoRefreshed = true)
    int insAnalysisLanguagePriorityRetryTimes;

    /**
     * insBloggerLocationPriority 消息重发最大次数
     */
    @NacosValue(value="${ins.data.collector.message.insBloggerLocationPriority.retry:1}", autoRefreshed = true)
    int insBloggerLocationPriorityRetryTimes;

    /**
     * insBloggerFollowingPriority 消息重发最大次数
     */
    @NacosValue(value="${ins.data.collector.message.insBloggerFollowingPriority.retry:1}", autoRefreshed = true)
    int insBloggerFollowingPriorityRetryTimes;

    /**
     * insComment 消息时限范围
     */
    @NacosValue(value="${ins.data.collector.insComment.accept.minTime.limit:1440}", autoRefreshed = true)
    int acceptInsCommentMsgTimeMinRange;

    /**
     * 每次爬取评论列表的条数，0：默认值
     */
    @NacosValue(value="${ins.spider.comment.each.count:0}", autoRefreshed = true)
    int insSpiderCommentEachCount;

    /**
     * 采集评论的条数
     */
    @NacosValue(value="${ins.data.collector.insComment.count:1000}", autoRefreshed = true)
    int insCommentCollectCount;

    /**
     * 采集评论的条数最低评论数
     */
    @NacosValue(value="${ins.data.collector.insComment.base.count:200}", autoRefreshed = true)
    int insCommentCollectBaseCount;

    /**
     * 帖子最小的评论数达到要求才采集它的评论
     */
    @NacosValue(value="${ins.data.collector.insComment.media.min.count:0}", autoRefreshed = true)
    int insCommentCollectMediaMinCount;

    /**
     * 采集评论后转化成活跃粉丝的个数
     */
    @NacosValue(value="${ins.data.collector.insComment.active.follower.count:5}", autoRefreshed = true)
    int insCommentCollectActiveFollowerCount;
}
